package com.library.admin.modules.user.bo;

import jakarta.validation.constraints.Size;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serial;
import java.io.Serializable;


/**
 * 修改密码
 *
 * @author: xyh
 * @create: 2023-08-03
 **/
@Data
public class UserChangePasswordBO implements Serializable {

    @Serial
    private static final long serialVersionUID = -5743011544604686914L;
    /**
     * 原密码
     */
    @NotBlank(message = "原密码不能为空")
    private String oldPassword;

    /**
     * 新密码
     */
    @NotBlank(message = "新密码不能为空")
    @Size(min = 6, max = 12, message = "密码须为8-20位")
    private String newPassword;

    /**
     * 确认新密码
     */
    @NotBlank(message = "确认新密码不能为空")
    @Size(min = 6, max = 12, message = "密码须为8-20位")
    private String confirmNewPassword;
}
